home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2003-06-24 | 62.1 KB | 1,634 lines
<html> <head> <title>EventLogWatch Display</title> <link rel="stylesheet" type="text/css" href="css/rpmstyle.css"> <style> .EventFilter { border-style : solid; border-width : thin; overflow : clip; background-color:white } .EventFilter { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .EventLog { border-style : solid; border-width : thin; overflow : scroll; background-color:white } .EventLog { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .EventConfig { overflow : none; background-color:activeborder } .EventConfig { border-top-color : graytext; border-left-color : graytext; border-bottom-color : white; border-right-color : white} .VASelectBox { height : 270px; width : 375px; background-color: white; color: infotext; } .VASelectBox { border-style : solid; border-width : 2px; } .VASelectBox { border-top-color : #555555; border-left-color : #555555; border-bottom-color : #E0E0E0; border-right-color : #E0E0E0} .VAMainBox { border: none; background-color : activeborder; } .PopUpBox { background-color:activeborder; position:absolute; margin:0; padding:0; border : solid thin; } .PopUpBox { border-top-color : #E0E0E0; border-left-color : #E0E0E0; border-bottom-color : #555555; border-right-color : #555555 } </style> </head> <body class="bodyc" style="margin:2px;" language="JavaScript" RPMHostIP="!BreakoutBot:MonitorIP!" RPMHostPort="!BreakoutBot:MonitorPort!" RPMUserName="!BreakoutBot:UserName!" BOBDone="!BreakoutBot:Done!" onload="top.banner.savePageCoord(event,document.body,'ViewEventlogDisplay'); InitRpmCC_VA();" onbeforeunload="DiscoRpmCC_VA()" onresize="processSizeChange()" onclick="checkClick()" onkeydown="processBSP()"> <script LANGUAGE="JavaScript"> <!-- //border-style : solid; border-width : thin; var VAMode = ""; // Mode of Operation, New, Edit, Delete, Lookup, ObjectLookup var ALupMode = ""; // Lookup Mode of Operation, Computer, Counter var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation var AlertSelectIdx = 0; // Index of currently selected Alert var VA_CommBusy = 0; // Comm busy flag var CurAlertID = ""; // Current Alert Name selected in Configure var CurAlertName = ""; // Current Alert Group Name selected in Configure var CurAlertDesc = ""; // Current Alert Group Description var FilterRecCnt = 0; // Count of records in the filter var FilterSelectIdx = 0; // Filter Select Index var AudioOutBusy = false; // Flag for AudioOut var VA_Tid = null; // AudioOut free timeout var Tid = null, CTid= null, ATid= null; var ELogWinInit = ""; // save for ElogWin init HTML var ELBgFlg = 0; // Alert Event Log Background color toggle var bdH = 0; var byM = null; var borderSz = 2; // Thin Bord is 2pixels var ValidateFilter = true; // Validate Alert Filter on entry var Hp = null; // Host port var ReconnectEvent = false; var AC_CompStoreArr = new Array(); var MostRecentHours = 3; var IsDBChange = false; var AlertSelectIdx = 0; // Index of currently selected Alert var AlertStoreArr = new Array(); var AlertLupRecCount = 0; // Count of records returned from Alert Lookup operation // Capture and ignore script errors window.onerror = wwScrErr; function wwScrErr() { return true; } /* On Load tell the Comm control to Connect to the Server */ function InitRpmCC_VA() { top.MainLoaded = true; // Flag that Main is now loaded top.banner.savePageCoord(event,document.body,"ViewEventlogDisplay"); byM = 2*parseFloat(document.body.style.margin); processSizeChange(); /* get Audio Alert checkbox state */ cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"EventlogDisplayAudioAlertState"); // get state if ( cc == "unchecked" ) { // If not checked AlertAudioEnabled.checked = ""; } else { AlertAudioEnabled.checked == "CHECKED"; } cc = top.banner.RpmCC_Ban.RegGetKey(top.banner.ServerID+"EventlogDisplayMostRecentHours"); // get hours if ( cc != "" ) { MostRecentHours = parseInt(cc,10); } /* Connect to Server and initiate Alert Group Lookup */ Hp = parseInt(document.body.RPMHostPort,10); RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processReconnect() { Tid = null; if ( RpmCC_VA.IsConnected() ) { Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection return; } RpmCC_VA.Connect(document.body.RPMHostIP,Hp, ""); } function processConnectConfirmed() { if ( ReconnectEvent == false ) { top.banner.processStartComm(); processVALookupReset(); // go do Alert Lookup processLogAndFilterWindows(); // initialize Log and Filter Windows ReconnectEvent = true; } top.Rstatus.Pstat("Connected"); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } function processConnectionCheck() { Tid = null; RpmCC_VA.SendKeepAlive("Check"); Tid = setTimeout("processConnectionCheck()",30000); // Delay 30 secs then check connection } function processMostRecentHours() { MostRecentHours = lasthours.selectedIndex; top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"EventlogDisplayMostRecentHours",""+MostRecentHours); // set hours processClearButton(); processMostRecentHoursLookup(); } function processMostRecentHoursLookup() { WarningBox.style.display = ""; if ( MostRecentHours > 0 ) { // Get Last 'N' Records if ( RpmCC_VA.GetEventLogDataRecord("GetLast"+MostRecentHours) ) { top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag } } else { WarningBox.style.display = "none"; WarningBox1.style.display = ""; } } // Process Database Change event function processDBChanged() { CTid = null; top.banner.processStartComm(); IsDBChange = true; // Insure Configure pop-up is hidden and disabled //ConfigButton.className = "BoxButtonD"; // disable button ConfigButton.disabled = "disabled"; // disable button PopUpDiv.style.display="none"; goSaveLogEntries(); // Clear Stores AlertStoreArr.length = 0; AC_CompStoreArr.length = 0; ValidateFilter = true; AlertSelectIdx = 0; // Reset Index of currently selected Alert processVALookupReset(); // go do Alert Lookup top.Rstatus.StatDB.style.display = "none"; AL_AlertSel.style.display = "none"; } /* On Unload tell the Comm control to Disconnect from the Server */ function DiscoRpmCC_VA() { top.BannerMenuShow(); RpmCC_VA.Disconnect(); if (VA_CommBusy == 1) { // stop logo animation if Comm busy flag set top.banner.processStopComm(); } // Save Audio Alert checkbox state cc = ( AlertAudioEnabled.checked == false ) ? "unchecked" : "checked"; top.banner.RpmCC_Ban.RegSetKey(top.banner.ServerID+"EventlogDisplayAudioAlertState",cc); // set state processClearButton(); WarningBox.style.display = ""; goSaveLogEntries(); /* Clear AudioOut Timer if set */ if ( VA_Tid != null ) { clearTimeout(VA_Tid); } if ( Tid != null ) { clearTimeout(Tid); } if ( CTid != null ) { clearTimeout(CTid); } if ( ATid != null ) { clearTimeout(ATid); } } function goSaveLogEntries() { /* Redefine Log Time based on Current Time */ var dob = new Date(); // get current d/t var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds(); ELogParams.logtime = lt; // update the D/T stamp ELogParams.ELBgFlg = ELBgFlg; // save background flag /* Save the Log Display, and Filter Display & Store on the Banner Page before exiting */ top.banner.saveLogDisplay(ELogWin.innerHTML); top.banner.saveLogFilter(ELogViewCur.innerHTML); AL_AlertSel.innerText = ""; // clear } // Process Display View Size Change var SCbsy = false; var PuPW = "500px", PuPWu=500, PuPH = "280px", PuPHu=280, PuPCH = "235px"; var VFilW = "630px" function processSizeChange() { if ( SCbsy ) return; SCbsy = true; // Display Height and Width bCh = document.body.clientHeight; bCw = document.body.clientWidth; // Determine minimums bCh = (bCh < bdH+byM+270) ? bdH+byM+270 : bCh; bCw = (bCw < PuPWu) ? PuPWu : bCw; document.body.scroll = (bCw <= PuPWu || bCh <= bdH+byM+270) ? "yes" : "no"; // Set Height/Widths for Chart and Button areas VA_MainBox.style.height = bCh-(bdH+byM-borderSz)-10; VA_MainBox.style.width = bCw-byM-4; VA_MainBox.style.display = ""; ELogWinFullH = "" + (bCh-TitleDivSize); var ELWinc = (bCh-TitleDivSize-175); ELWinc = (ELWinc < 0) ? 0 : ELWinc; ELogWinSplitH = "" + ELWinc; ELogWin.style.height = ( ELogViewCurLine.style.display == "none" ) ? ELogWinFullH : ELogWinSplitH; ELogViewCur.style.width = (bCw-byM-34 > 530) ? "530px" : bCw-byM-34; //PopUpContext Menu PopUpContextSize(bCw); // PopUp PuPLeft = (bCw-PuPWu)/2; PuPTop = (bCh-PuPHu)/2; PopUpDiv.style.left = PuPLeft+"px"; PopUpDiv.style.top = "25px"; PopUpDiv.style.height = (bCh-110); PopUpDiv.style.width = PuPW; VA_Select.style.height = (bCh-130); SCbsy = false; } /* Initial Alert Lookup Request */ function processVALookupReset() { AlertLupRecCount = 0; // clear Lookup record counter if ( RpmCC_VA.AlertGroupLookup("*") ) { top.Rstatus.Pstat("Unable to start the Alert LOOKUP request",true); processResetButton(); } else { VA_CommBusy = 1; // set Comm busy flag top.Rstatus.Pstat("One moment while Alert LOOKUP request completes"); } } /* Alert Lookup Op Complete */ function processAlertOpComplete() { AL_AlertSel.style.display = "none"; // insure hidden if (AlertLupRecCount == 0) { // check if any records found top.Rstatus.Pstat("No record matches found for Alert LOOKUP request",true); WarningBox.style.display = "none"; WarningBox1.style.display = ""; } else { for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) { if ( AlertStoreArr[i+8] == "01/01/1999 11:40:00" || AlertStoreArr[i+8] == "1/1/1999 11:40:0" ) { // Keep EventLog Alert } else { // Otherwise delete all other Alert types AL_AlertSel.remove(i/AlertRecLength); var idx = i; for (var j = idx+AlertRecLength; j < AlertStoreArr.length; ++idx, ++j) { AlertStoreArr[idx] = AlertStoreArr[j]; } i -= AlertRecLength; AlertStoreArr.length -= AlertRecLength; } } AL_AlertSel.style.display = ""; // compnesate for IE 5.5 bug; see "hideAlertSel()" below ALupMode = ""; //ConfigButton.className = "BoxButton"; // enable button ConfigButton.disabled = ""; // enable button //ViewCurrentButton.className = "BoxButton"; // enable button ViewCurrentButton.disabled = ""; // enable button top.Rstatus.Pstat("Request Completed"); processValidateFilter(); // go validate the Alert Filter if ( IsDBChange == false ) { processMostRecentHoursLookup(); } IsDBChange = false; processAccumulatedAlerts(); // go process the accumulated Alerts top.banner.processStopCommX(); Tid = setTimeout("hideAlertSel()",50); // Delay 50 ms. then try to hide AlertSel } processResetButton(); } // Print Log var DiscStatWindow = null; function processPrintStatus() { if ( !top.banner.IE55orBetter ) { alert("Print requires IE 5.5/SP1 or greater. Download current, free IE update from Microsoft's web site"); return; } FakeBut.click(); // simulate event to call "savePageCoord(...)" var wprop = "height="+top.banner.bCh+",width="+top.banner.bCw wprop += ",top="+(top.banner.bY-28)+",left="+(top.banner.bX-4)+",scrollbars"; var rName = ""+Math.random(); // use Random number to get unique Window name rName = rName.substring(2,rName.length); DiscStatWindow = window.open("",rName,wprop); if ( DiscStatWindow == null ) { return; } var dh = "<html><head><title>MonitorIT - EventLogWatch Display Report</title>"; dh += "<link rel='stylesheet' type='text/css' href='css/rpmstyle.css'></head><body"; dh += " title='Exit to Close Window when Printing is complete'>"; dh += ELogWin.innerHTML; dh += '<script LANGUAGE="JavaScript">HdrTable.border="1"; ploghdr1.width="20"; ploghdr2.width="30"; ploghdr3.width="150"; ploghdr4.width="94"; ploghdr5.width="102"; ploghdr6.width="48"; ploghdr7.width="48"; window.focus();'; dh += ' </script></body></html>'; DiscStatWindow.document.open(); DiscStatWindow.document.write(dh) DiscStatWindow.document.close(); DiscStatWindow.print(); } /* Initialize the Log and Filter Windows */ function processLogAndFilterWindows() { var hs = ""; outputLogWindowHeader(); ELogWinInit = ELogWin.innerHTML; // save for clear log outputFilterWindowHeader(); /* Restore the Log Display if Previously Saved */ hs = top.banner.restoreLogDisplay(); if ( hs != "" ) { ELogWin.innerHTML = hs; ELBgFlg = ELogParams.ELBgFlg; // restore } /* Restore the Filter Display and Storage if Previously Saved */ hs = RpmCC_VA.RegGetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave"); if ( hs != "" ) { ELogViewCur.innerHTML = hs; FilterRecCnt = VA_FilterStore.length / FilterRecSize; } } function outputLogWindowHeader() { /* Format Output to Log Window */ FOps = "<table id='HdrTable' border='0' cellpadding='1' cellSpacing='1' width='100%'><tr>"; FOps += "<td id='ploghdr1' width='20' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Log" + "</td>"; FOps += "<td id='ploghdr2' width='30' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Type" + "</td>"; FOps += "<td id='ploghdr3' width='150' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Server/Computer Name" + "</td>"; FOps += "<td id='ploghdr4' width='94' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Source" + "</td>"; FOps += "<td id='ploghdr5' width='102' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Date/Time" + "</td>"; FOps += "<td id='ploghdr6' width='48' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Event ID" + "</td>"; FOps += "<td id='ploghdr7' width='48' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Categ" + "</td>"; FOps += "<td width='*' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Event Description" + "</td>"; FOps += "</tr></table>"; ELogWin.insertAdjacentHTML("afterBegin",FOps); WarningBox.style.display = ""; } function outputFilterWindowHeader() { /* Format Output to Filter Window */ FOps = "<table border='0' cellpadding='0' cellSpacing='1' width='500'>"; FOps += "<tr><td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Watch/Alert Name" + "</td>"; FOps += "<td width='50%' colspan='1' align='center' style='background-color:activeborder' class='optextb'>"; FOps += "Watch/Alert Type" + "</td>"; FOps += "</tr></table>"; ELogViewCur.insertAdjacentHTML("beforeEnd",FOps); } // Process the Unsolicited Alerts that were Accumulated function processAccumulatedAlerts() { var PrevAgid = "", hs = null; /* Get and process the Unsolicited Alerts accumulated */ var Tflg = ELogParams.logtime; // Time stamp of last Log entry if ( Tflg == "0" ) { // get Start Time for Client Tflg = top.banner.getLogStartTime(); ELogParams.logtime = Tflg; } // Get Event Log Alerts PrevAgid = ""; // reinitialize Uaa = top.banner.getUnsolicitedEventLogAlertArray(); top.banner.enableUnsolicitedEventLogAlerts(); UaaArray = Uaa.split(","); // Parse out the AlertGroupIDs~LogFileDataID for ( var i=0; i<UaaArray.length; i++ ) { hs = UaaArray[i]; // get an AlertGrp ID~LogFileDataID if ( hs != PrevAgid ) { // if same as previous, skip it processUnsolicitedEventLogAlertEvent(hs,Tflg); PrevAgid = hs; // set as Previous } } if ( ELogParams.logeventid != "" ) { //ClearButton.className = "BoxButton"; // enable button ClearButton.disabled = ""; // enable button } } /* Play specified WAV file as an AudioAlert */ function processAlertAudioOut(ETs, ECn, EOn, ECmn, ACs, ACd) { if ( AlertAudioEnabled.checked == false || AudioOutBusy == true ) return; // exit if not enabled or Busy RpmCC_VA.DoMessageBeep(0x40); // System Asterisk } function freeAudioOut() { AudioOutBusy = false; } /* Process the Unsolicited Event Log Alert Event */ function processUnsolicitedEventLogAlertEvent(AGID_ELDID,Tflg) { var warr = new Array(); warr = AGID_ELDID.split("~"); // split out Alert Grp ID and LogData Record ID if ( CheckAlertFilter(warr[0],Tflg) == false ) return; // if not in filter /* Initiate Read of EventLog Data */ if ( RpmCC_VA.GetEventLogDataRecord(warr[1]) ) { top.Rstatus.Pstat("Unable to start the EventLog Data Record LOOKUP request",true); } else { VA_CommBusy = 1; // set Comm busy flag } } // Event Log Alert Log Record var ServEventRecLth = 2; function processAlertEventLogRecord(LogRecStrg) { var SLRec = new Array(); SLRec = LogRecStrg.split("~"); // parse the Log Record // Alert Group ID, Computer ID, Time Stamp if ( IsDisplayInLog(SLRec[3],SLRec[2],SLRec[5]) == false ) return; // Didn't pass filter test /* Check for duplicate by comparing versus Event ID array */ var EidArr = new Array(); EidArr = ELogParams.logeventid.split(","); Eid = SLRec[0]+"~"+SLRec[3]; // Event ID = EventLog MonitorID~AlertGroupID for ( var i=0; i<EidArr.length; i++ ) { if ( Eid == EidArr[i] ) // if match then duplicate return; } var CompID = SLRec[2]; // Computer ID // Save Event Log Record string in temporary store addElementToSelect(VA_ServEventStore,CompID); //+0 addElementToSelect(VA_ServEventStore,"EventLog~"+LogRecStrg); /* Lookup Computer Name and Description */ if ( ALupMode != "AlertEvent" ) { // if read not already in progress, goCheckServEventStore(); } } var curServAlertCompNme = null; var curServAlertCompDesc = null; function processAlertServicesComputerLookup(CID,CNME,CDESC) { curServAlertCompNme = CNME; // save Computer Name and Description curServAlertCompDesc = CDESC; goProcessLogRec(CID); // go process log record goCheckServEventStore(); } function goCheckServEventStore() { var CompID = null; while ( VA_ServEventStore.length > 0 ) { CompID = VA_ServEventStore.options[0].text; // get next entry if ( getCompNameDesc(CompID) ) { // see if Computer already in local store if ( !goProcessLogRec(CompID) ) // yes-go process immediately break; } else if ( !RpmCC_VA.ComputerLookupByIDArray(CompID) ) { ALupMode = "AlertEvent"; VA_CommBusy = 1; // set Comm busy flag return true; // exit now } } ALupMode = ""; // reset return false; } function goProcessLogRec(CmpID) { // process log record /* Get Log Record from Store based on Computer ID */ for (var i=0; i < VA_ServEventStore.length; i+=ServEventRecLth) { if ( VA_ServEventStore.options[i].text == CmpID ) { outputLogEvent(null,VA_ServEventStore.options[i+1].text); // go process for ( var j=0; j<ServEventRecLth; j++ ) { // remove from temporary store VA_ServEventStore.remove(i); } return true; } } return false; } /* Check Filter for Eligible Alert */ function CheckAlertFilter(Agid,Tflg) { if ( Tflg == null ) { // set serach time for Event if not specified Tflg = ELogParams.logtime; if ( Tflg == "0" ) { // get Start Time for Client Tflg = top.banner.getLogStartTime(); ELogParams.logtime = Tflg; } } return IsDisplayInLog(Agid,null,Tflg);// check if in Filter } /* Process Clear Log button click */ function processClearButton() { ELogWin.innerHTML = ELogWinInit; // clear log WarningBox.style.display = "none"; /* Redefine Log Time based on Current Time */ var dob = new Date(); // get current d/t var lt = (dob.getMonth()+1) + "/" + dob.getDate() + "/" + dob.getFullYear(); lt += " " + dob.getHours() + ":" + dob.getMinutes() + ":" + dob.getSeconds(); ELogParams.logtime = lt; // update the D/T stamp ELBgFlg = 0; //ClearButton.className = "BoxButtonD"; // disable button ClearButton.disabled = "disabled"; // disable button //StatusPrintButton.className = "BoxButtonD"; // disable button StatusPrintButton.disabled = "disabled"; // disable button } /* Process Configure Button Click */ function processConfigureButton() { if ( ALupMode == "AlertEvent" ) return; // ignore, currently doing Computer Lookup //ConfigButton.className = "BoxButtonD"; // disable button ConfigButton.disabled = "disabled"; // disable button PopUpDiv.style.display=""; AL_AlertSel.style.display = ""; if ( AL_AlertSel.length > 0 ) { AL_AlertSel.options[0].selected = "selected"; populateInput(0); } if ( lasthours.length == 0 ) { for ( var i=0; i<25; i++ ) { stxt = ""+i; el = addElementToSelect(lasthours,stxt); if ( i == MostRecentHours ) { el.selected = "selected"; } } } } function processDoneButton() { ALupMode = ""; // reset RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML) AL_AlertSel.style.display = "none"; PopUpDiv.style.display = "none"; //ConfigButton.className = "BoxButton"; // enable button ConfigButton.disabled = ""; // enable button top.Rstatus.Pstat(""); } /* Process ViewCurrent and Hide Current Log Filter Button Clicks */ function processViewCurrentButton() { ELogWin.style.height=ELogWinSplitH; vct = ELogViewCurLine.innerHTML; ELogViewCurLine.style.display=""; ELogViewCurLine.innerHTML = vct; //ViewCurrentButton.className = "BoxButtonD"; // disable button ViewCurrentButton.disabled = "disabled"; // disable button ELogViewCurLine.scrollIntoView(false); } function processHideCurrentButton() { ELogWin.style.height=ELogWinFullH; ELogViewCurLine.style.display="none"; //ViewCurrentButton.className = "BoxButton"; // enable button ViewCurrentButton.disabled = ""; // disable button } /* Process Update Log Filter and Window */ function processUpdateLogFilter(FilOp) { if ( FilOp == "add" ) { // Add an entry to the Current View FOps = "<div agrpid='" + CurAlertID + "' onclick='processLogFilterClick(this)' id='lf"; FOps += CurAlertID + "' style='background-color:white; cursor:hand'>" } else { // otherwise, Update an entry in the Current View Fo = document.all["lf"+CurAlertID]; Fo.innerHTML = ""; // clear entry FOps = ""; } /* Accomodate Names Larger than Field Size */ Fcon = "EventLog: " + CurELName; if ( Fcon.length > 47 ) { // Object : Name FconT = Fcon; // set for display in the title Fcon = Fcon.substring(0,46) + "..."; } else { FconT = ""; } FconDesc = ""; /* Output Parameters */ FOps += "<table border='0' cellpadding='0' cellSpacing='1' width='500'>"; FOps += "<tr><td width='50%' align='left' class='optext' style='cursor:hand' title='" + CurAlertDesc + "'>"; FOps += CurAlertName + "</td>"; FOps += "<td width='50%' align='left' class='optext' style='cursor:hand' title='" + FconT + FconDesc + "'>"; FOps += Fcon + "</td>"; FOps += "</tr></table>"; if ( FilOp == "add" ) { FOps += "</div>"; ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; ELogViewCur.insertAdjacentHTML("beforeEnd",FOps); } else { Fo.insertAdjacentHTML("beforeEnd",FOps); } } /* Process Click on an Entry in the Log Filter Current View */ var CurLflSelected = null; function processLogFilterClick(LFobj) { if ( CurLflSelected != null ) { document.all[CurLflSelected].style.backgroundColor = "white"; } if ( CurLflSelected == LFobj.id ) { // if same line //VC_DeleteButton.className = "BoxButtonD"; VC_DeleteButton.disabled = "disabled"; CurLflSelected = null; } else { CurLflSelected = LFobj.id; LFobj.style.backgroundColor = "scrollbar"; //VC_DeleteButton.className = "BoxButton"; VC_DeleteButton.disabled = ""; } } /* Process Delete Button Click */ function processDeleteEntryButton() { if ( CurLflSelected != null ) { // if an entry is highlited // delete highlited entry CAid = document.all[CurLflSelected].agrpid; // get AlertGrp ID document.all[CurLflSelected].outerText = ""; // clear entry CurLflSelected = null; // reset to no selected entry //VC_DeleteButton.className = "BoxButtonD"; // disable Delete button VC_DeleteButton.disabled = "disabled"; // disable Delete button // clear entry from the Filter Store FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CAid) == null ) // Find index to the entry in the Store return; // if entry not found for ( var i=0; i<FilterRecSize; i++ ) { // remove entry from the Store FilObj.remove(FilterSelectIdx); } --FilterRecCnt; // adjust count ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; // update save in Registry RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML) } } /* Process Show Event Button Click */ var FilterRecSize = 7; // Filter Record size function processApplyButton() { var Scid = ""; // Computer ID Array /* Create an array of selected computers */ for ( var i=0, j=0; i<CountOfComps; i++ ) { // Test each computer for Checked if ( document.all["cmpa_"+i].checked == "1" ) { if ( j > 0) { Scid += ","; // array id separator } Scid += document.all["cmpa_"+i].cmpid; // save Computer ID ++j; } } if ( j == 0 ) { CurLflSelected = "lf"+CurAlertID; processDeleteEntryButton(); return; } var nd = new Array(); ASdt = VA_StartDate.value; // Get Start Date AEdt = VA_StopDate.value; // Get End Date nd = ASdt.split(" "); ASdt = nd[3] + " " + "0:0:0"; var Dob = new Date(ASdt); // Date object Sms = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0 nd = AEdt.split(" "); AEdt = nd[3] + " " + "23:59:59"; Dob = new Date(AEdt); Ems = Dob.getTime(); // Milliseconds since 1/1/70 0:0:0 /* See if entry already exists in the filter */ FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CurAlertID) != null ) { // if entry already in the filter FilOp = "repl"; // Filter Update Op is Replace i = FilterSelectIdx; // index to found entry FilObj.options[i+1].text = Scid; FilObj.options[i+2].text = ASdt; FilObj.options[i+3].text = Sms; FilObj.options[i+4].text = AEdt; FilObj.options[i+5].text = Ems; FilObj.options[i+6].text = curServName; // current Service Name if Service } else { // otherwise, not yet in the Filter Store FilOp = "add"; // Filter Update Op is Add addElementToSelect(FilObj,CurAlertID); addElementToSelect(FilObj,Scid); addElementToSelect(FilObj,ASdt); addElementToSelect(FilObj,Sms); addElementToSelect(FilObj,AEdt); addElementToSelect(FilObj,Ems); addElementToSelect(FilObj,curServName); // current Service Name if Service ++FilterRecCnt; // bump record count } /* Update Log Filter Window */ processUpdateLogFilter(FilOp); /* Initiate Read of Event Table for Events Matching Criteria if Counter */ if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } } /* Search Filter Store for Given Alert Group ID */ function getFilterEntry(AGID) { FilObj = VA_FilterStore; // Filter Store FilMax = FilterRecCnt * FilterRecSize; for ( i=0; i<FilMax; i+=FilterRecSize ) { if ( AGID == FilObj.options[i].text ) { FilterSelectIdx = i; // save index return i; } } return null; } // Validate Alert Filter function processValidateFilter() { if ( ValidateFilter == false ) return; // exit if not needed ValidateFilter = false; // reset for ( var i=0; i<VA_FilterStore.length; i+=FilterRecSize ) { // Check for valid Alert Group ID and that End D/T is greater than current D/T if ( !IsValidAlertGroup(VA_FilterStore.options[i].text) ) { // remove entry from Filter display document.all["lf"+VA_FilterStore.options[i].text].outerText = ""; // remove entry from the Store for ( var j=0; j<FilterRecSize; j++ ) { VA_FilterStore.remove(i); } --FilterRecCnt; // adjust count i -= FilterRecSize; // adjust index for just deleted entry } } ELogViewCur.style.overflow = ( FilterRecCnt > 5 ) ? "scroll" : ""; // update save in Registry RpmCC_VA.RegSetKey(top.banner.ServerID+"EventlogDisplayLogFilterSave",ELogViewCur.innerHTML) } /* Check if Valid Alert Group ID */ function IsValidAlertGroup(UID) { for (var i=0; i < AlertStoreArr.length; i+=AlertRecLength) { if ( AlertStoreArr[i+1] == UID ) { return true; } } return false; } /* Search Filter and Determine If Event Should Be Displayed */ function IsDisplayInLog(AGID,CID,TS) { // check if entry in Filter for Alert Group ID if ( VA_FilterStore.length == 0 ) { return true; // defaultto show everthing if no filter } if ( getFilterEntry(AGID) == null ) return false; // not in Filter // check if Computer ID in Array of Found Filter entry if ( CID != null ) { var CaR = new Array(); FilObj = VA_FilterStore; // Filter Store CaR = FilObj.options[FilterSelectIdx+1].text.split(","); // Comp ID array for ( var i=0; i<CaR.length; ++i ) { if ( CID == CaR[i] ) // if match on Comp ID break; } if ( i>=CaR.length ) return false; // not in Filter } // Specified parameters match a Filter entry return true; } var EventRecCount = 0; // Count of temporary Event records var EventRecLength = 18; // Event record length var EventSelectIdx = 0; function AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme) { StoreObj = VA_EventStore; // Storage if ( IsEventExist(EvID) == false ) { // if not received yet addElementToSelect(StoreObj,EvID); //+0 addElementToSelect(StoreObj,EvTimStmp); addElementToSelect(StoreObj,EvCntNme); addElementToSelect(StoreObj,EvObjNme); addElementToSelect(StoreObj,EvCmpNme); addElementToSelect(StoreObj,EvValue); //+5 addElementToSelect(StoreObj,EvEmNotify); addElementToSelect(StoreObj,EvPhNotify); addElementToSelect(StoreObj,EvProNotify); addElementToSelect(StoreObj,EvPgNotify); //+9 addElementToSelect(StoreObj,EvThresh); addElementToSelect(StoreObj,EvOver); addElementToSelect(StoreObj,EvDur); //+12 /* allocate space for Part 2 */ addElementToSelect(StoreObj,""); //+13 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+17 } else { // already received Part 2, update Part 1 ESix = EventSelectIdx * EventRecLength; StoreObj.options[ESix+0].text = EvID; StoreObj.options[ESix+1].text = EvTimStmp; StoreObj.options[ESix+2].text = EvCntNme; StoreObj.options[ESix+3].text = EvObjNme; StoreObj.options[ESix+4].text = EvCmpNme; StoreObj.options[ESix+5].text = EvValue; StoreObj.options[ESix+6].text = EvEmNotify; StoreObj.options[ESix+7].text = EvPhNotify; StoreObj.options[ESix+8].text = EvProNotify; StoreObj.options[ESix+9].text = EvPgNotify; //+9 StoreObj.options[ESix+10].text = EvThresh; StoreObj.options[ESix+11].text = EvOver; StoreObj.options[ESix+12].text = EvDur; //+12 outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store StoreObj.remove(ESix); } } } function AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver) { StoreObj = VA_EventStore; // Storage if ( IsEventExist(EvID) == false ) { // if not received yet // allocate space for Part 1 addElementToSelect(StoreObj,EvID); //+0 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+5 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+9 addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); addElementToSelect(StoreObj,""); //+12 /* save Part 2 */ addElementToSelect(StoreObj,EvCmpID); //+13 addElementToSelect(StoreObj,EvAlGrpID); addElementToSelect(StoreObj,EvObjDesc); addElementToSelect(StoreObj,EvCntrDesc); addElementToSelect(StoreObj,EvCmpDesc); //+17 } else { // already received Part 1, update Part 2 ESix = EventSelectIdx * EventRecLength; StoreObj.options[ESix+13].text = EvCmpID; StoreObj.options[ESix+14].text = EvAlGrpID; StoreObj.options[ESix+15].text = EvObjDesc; StoreObj.options[ESix+16].text = EvCntrDesc; StoreObj.options[ESix+17].text = EvCmpDesc; outputLogEvent(StoreObj,ESix); // go output to Log Window if eligible for ( var i=0; i<EventRecLength; i++ ) { // remove from temporary store StoreObj.remove(ESix); } } } var LogEventBsy = false; /* Check if Event Passes Filter Test and if so, Output to Log Window */ function outputLogEvent(ESObj,ESx) { if ( ESObj != null ) return; var warr = new Array(); var SLRec = new Array(); SLRec = ESx.split("~"); // parse the Log Record if ( SLRec[0] == "EventLog" ) { // process EventLog Alert EGid = SLRec[4]; // Alert Group ID ECmn = curServAlertCompNme; // Computer Name ECmd = curServAlertCompDesc; // Cmp Desc EOn = EOvr = ""; // Obj Name, Over warr = SLRec[6].split("/"); // Time Stamp warr[0] = ""+parseInt(warr[0],10); warr[1] = ""+parseInt(warr[1],10); ETs = warr.join("/"); Eid = SLRec[1]+"~"+SLRec[4]; // Event ID Ev = SLRec[11]; // Status Code = Event ID // make sure complete message has no single quote characters warr.length =0; warr = SLRec[12].split("'"); SLRec[12] = warr.join("`"); var EvLTyp = ""; if ( SLRec[8] == "1" ) { EvLTyp = "Error"; } else if ( SLRec[8] == "2" ) { EvLTyp = "Warning"; } else if ( SLRec[8] == "4" ) { EvLTyp = "Information"; } else if ( SLRec[8] == "8" ) { EvLTyp = "Security"; } ECON = ECn = "EvLog "+SLRec[7]+" / "+EvLTyp; // Event Log Name & Type ECONT = ""; } // Determine Event Type; Check if not filtered Etyp = "Info"; //preset EImg ="EInfo"; if ( SLRec[8] == "1" ) { // Error Type Etyp = "Error"; EImg = "EErr"; } else if ( SLRec[8] == "2" ) { Etyp = "Warn"; EImg = "EWarn"; } else if ( SLRec[8] == "4" ) { Etyp = "Info"; EImg ="EInfo"; } else if ( SLRec[8] == "8" ) { Etyp = "Sec"; EImg ="ESecurity"; } else if ( SLRec[8] == "16" ) { Etyp = "Sec"; EImg ="ESecurityFailure"; } // Determine Log type var LogType = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service"); mtype = "Apl"; if ( SLRec[7] == LogType[1] ) { mtype = "Sec"; } else if ( SLRec[7] == LogType[2] ) { mtype = "Sys"; } else if ( SLRec[7] == LogType[3] ) { mtype = "Dir"; } else if ( SLRec[7] == LogType[4] ) { mtype = "Dns"; } else if ( SLRec[7] == LogType[5] ) { mtype = "Rep"; } // Go speak audio alert if enabled processAlertAudioOut(); // process AudioAlert /* Accomodate Names Larger than Field Size */ if ( ECmn.length > 30 ) { // Computer Name ECmnT = ECmn; // set for display in the title ECmn = ECmn.substring(0,30) + "..."; } else { ECmnT = ""; } if ( ECmd.charAt(ECmd.length-1) == "." ) { ECmd = ECmd.substring(0,ECmd.length-1); } ECmnT += ECmd; if ((ELBgFlg ^= 1) == 0) { FOps = "<div style='background-color:white'>"; } else { FOps = "<div style='background-color:e8e8e8'>"; } FOps += "<table border='0' cellpadding='1' cellSpacing='1' width='100%'"; FOps += "><tr>"; FOps += '<td width="20" class="optext">'; FOps += mtype + '</td>'; FOps += '<td width="30" align="center" class="optext"><img src="images/'; FOps += EImg + '.gif" align="absmiddle" width="17" height="18"></td>'; FOps += '<td width="150" class="optext">'; FOps += ECmn + '</td>'; FOps += '<td width="94" class="optext">'; FOps += SLRec[9] + '</td>'; FOps += '<td width="102" class="optext">'; FOps += ETs + '</td>'; FOps += '<td width="48" class="optext">'; FOps += SLRec[11] + '</td>'; FOps += '<td width="48" colspan="1" class="optext">'; FOps += ((SLRec[10] == "0")?"NONE":SLRec[10]); FOps += '</td>'; FOps += '<td width="*" colspan="1" style="cursor:default" class="optext">'; var darr = new Array(); darr = SLRec[12].split("\x0d\x0a\x0a\x0d\x0a\x0a"); SLRec[12] = darr.join("<br>"); darr = SLRec[12].split("\x0d\x0a\x0a"); SLRec[12] = darr.join("<br>"); FOps += SLRec[12] + '</td>'; FOps += "</tr></table></div>"; ELogText.insertAdjacentHTML("afterBegin",FOps); //ELogWin.scrollIntoView(); ELogParams.logeventid += Eid + ","; // update the Event ID Array //ClearButton.className = "BoxButton"; // enable button ClearButton.disabled = ""; // enable button //StatusPrintButton.className = "BoxButton"; // enable button StatusPrintButton.disabled = ""; // enable button LogEventBsy = false; // set free } /* Get Alert Name from Store based on Alert ID */ function getAlertNameSpecial(UID) { AlertName = ""; for (i=0, j=0; i < AlertStoreArr.length; ++j, i+=AlertRecLength) { if ( AlertStoreArr[i+1] == UID ) { AlertName = AlertStoreArr[i]; AlertSelectIdx = j; break; } } return AlertName; } /* Get Event Name from Store based on Event ID */ function IsEventExist(EID) { ENobj = VA_EventStore; // get object for (var i=0, j=0; i < ENobj.length; ++j, i+=EventRecLength) { if ( ENobj.options[i].text == EID ) { EventSelectIdx = i; return true; } } return false; } /* Process Populate Configure Edit Fields */ var Tops = ""; // output string var SBObj = null; // SelectBox Object for output var CkCArr = new Array(); // "Checked" Computers array var curServName = null; // Current Service Name var CTparm = "optext"; // Computer Text Color var CurrentAlertType = null; function populateInput(idx) { SetCursor("wait"); setSelectAll(false); // disable Select/UnselectAll buttons CurAlertName = AlertStoreArr[idx]; CurAlertID = AlertStoreArr[idx+1]; CurAlertDesc = AlertStoreArr[idx+2]; CkCArr.length = 0; // init checked computer array curServName = ""; // initialize CountOfComps = 0; // clear // If Service, preset Start and End D to today var dob = new Date(); // get current d/t var calt = AlertStoreArr[idx+10]; AlertStoreArr[idx+10] = "EventLog"; CurrentAlertType = "E"; // "Event Log" type /* Check if Entry exists in the Filter */ FilObj = VA_FilterStore; // Filter Store if ( getFilterEntry(CurAlertID) != null ) { // if entry in the filter i = FilterSelectIdx; // index to found entry CkCArr = FilObj.options[i+1].text.split(","); // get checked CIDs } /* setup Object:Counter info for display */ SBObj = VA_Select; SBObj.innerHTML = ""; // clear current display if ( CurrentAlertType == "E" ) { // if Event Log if ( RpmCC_VA.ELMonitorLookupByAlertGroup(CurAlertID) ) { ALupMode = ""; top.Rstatus.Pstat("Unable to start the Event Log Computer LOOKUP request",true); return; } else { VA_CommBusy = 1; // set Comm busy flag CountOfCompsRcvd = 0; CompIdLupArr = ""; // Computer Id Array ALupMode = "ELComputerLookupPopIn"; // Mode top.Rstatus.Pstat("One moment while Computer LOOKUP request completes"); } } } function setSelectAll(sFlag) { if ( sFlag ) { SButtonState(bSelC,"0"); SButtonState(bUselC,"0"); } else { // otherwise disable the buttons SButtonState(bSelC,"1"); SButtonState(bUselC,"1"); } } function SButtonState(BtObj,BState) { //BtObj.className = (BState == "0") ? "BoxButton" : "BoxButtonD"; BtObj.disabled = (BState == "0") ? "" : "disabled"; } var CountOfCompsRcvd = 0; var LogTable = new Array("Application","Security","System","Directory Service","DNS Server","File Replication Service"); var CurELName = ""; function processELMonitorLookupRecord(ELCrec) { var wrkarr = new Array(); ++CountOfCompsRcvd; wrkarr = ELCrec.split("~"); // parse the computer record if ( CountOfCompsRcvd > 1 ) { // if not first CompIdLupArr += ","; // Computer Id Array } else { for ( var i=0; i<LogTable.length; i++ ) { if ( LogTable[i] == wrkarr[4] ) { CurELName = wrkarr[4]; break; } } } CompIdLupArr += wrkarr[2]; // Computer Id Array } function processELMonitorOpComplete() { if ( ALupMode == "ELComputerLookupPopIn" ) { if ( CountOfCompsRcvd > 0 ) { MaxCmpCount = CountOfCompsRcvd; SBObj.style.overflow = ( CountOfCompsRcvd > 4 ) ? "scroll" : ""; Tops = "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='5'> </td>"; Tops += "<td width='19' align='center'><img src='images/EventlogDisplaySm.gif' width='16' height='16'></td>"; Tops += "<td width='*' class='optext'>" + CurELName + " Log</td>"; Tops += "</tr></table>"; CountOfComps = 0; // initialize ALupMode = "EventPopIn"; processPopulateInputCounterOpComplete(); // Start lookup for Computer Names/Descriptions } else { ALMode = ""; // reset mode top.Rstatus.Pstat("No associated computers found for this Event Log alert",true); } } } function processELMonitorOpError() { top.Rstatus.Pstat("Error reading Event Log Monitor alert parameters",true); } var CountOfComps = 0; var MaxCmpCount = 0; var CompIdLupArr = ""; /* OpComplete for the CounterLookupForObjCounterArray */ function processPopulateInputCounterOpComplete() { if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present /* Lookup Computer Names and Descriptions */ if ( RpmCC_VA.ComputerLookupByIDArray(CompIdLupArr) ) { top.Rstatus.Pstat("Unable to start the Computer LOOKUP request",true); ALupMode = ""; // reset } else { VA_CommBusy = 1; // set Comm busy flag CountOfComps = 0; top.Rstatus.Pstat("One moment while lookup request completes"); } } function processPopulateInputComputer(Cid,CmpNme,CmpDesc) { if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present /* Format Computer Name and Description */ if ( CountOfComps+1 == MaxCmpCount ) { // if Last Computer for Display lineGIF = "L"; } else { lineGIF = "T"; } /* if using from Filter Entry, determine if Checked */ CkdS = "' checked='0' src='images/Unchecked.gif'"; // default var CImg = "Computer"; if ( CkCArr.length > 0 ) { // if from Filter for ( var i=0; i<CkCArr.length; i++ ) { if ( Cid == CkCArr[i] ) { // if this matches a Checked one break; } } if ( i < CkCArr.length ) { // if match versus Checked Array of IDs CkdS = "' checked='1' src='images/Checked.gif'"; CImg = "EventlogDisplaySm"; } } Tops += "<table border='0' cellpadding='0' cellSpacing='0' width='350'>"; Tops += "<tr><td width='39' height='20' align='right'><img src='images/" + lineGIF +".gif' width='19' height='20'></td>"; Tops += "<td width='11' align='center'><img id='cmpa_" + CountOfComps; Tops += "' cmpid='" + Cid + CkdS; Tops += " style='cursor:hand' onclick='procCompImgClick(this)' width='9' height='9'></td>"; Tops += "<td width='19' align='center'><img id='cmpb_" + CountOfComps; Tops += "' src='images/"+CImg+".gif' style='cursor:hand' onclick='procCompImgClick(this)' width='14' height='16' title='"; Tops += CmpDesc + "'></td>"; Tops += "<td width='*' class='"+CTparm+"'>" + CmpNme + "</td>"; Tops += "</tr></table>"; ++CountOfComps; // bump index } function processPopulateInputOpComplete() { /* Final Format and Output */ if ( PopUpDiv.style.display == "none" ) return; // exit if Configure Window no longer present ALupMode = ""; // reset SBObj.insertAdjacentHTML("beforeEnd",Tops); //DoneButton.className = "BoxButton"; // enable button DoneButton.disabled = ""; // enable button setSelectAll(true); // enable Select/UnselectAll buttons SetCursor("auto"); if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { top.Rstatus.Pstat("Request Completed"); AL_AlertSel.focus(); // restore focus } } function procUsrAltClick(CObj) { if ( CObj.id != "usralt0" ) return; if ( CObj.checked == "1" ) { // if currently Checked, Uncheck usralt1.src = "images/Unchecked.gif"; CObj.checked = "0"; // Set Unchecked } else { // otherwise Check usralt1.src = "images/Checked.gif"; CObj.checked = "1"; // Set Checked } processApplyButton(); } /* Process Click on Computer Image */ function procCompImgClick(COb) { isx = COb.id; if ( isx.charAt(0) != "c" ) // if not a "cmpa_xx" return; var cx = isx.substring(5,isx.length); // Strip off index CObj = document.all["cmpa_"+cx]; // Clicked Computer Entry var CIObj = document.all["cmpb_"+cx]; // Clicked Computer Entry Image if ( CObj.checked == "1" ) { // if currently Checked, Uncheck CObj.src = "images/Unchecked.gif"; CObj.checked = "0"; // Set Unchecked CIObj.src = "images/Computer.gif"; } else { // otherwise Check if ( CTparm == "optextr" ) { // if Suspended, don't add to filter top.Rstatus.Pstat("Alert is currently Suspended",true); if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } return; } CObj.src = "images/Checked.gif"; CObj.checked = "1"; // Set Checked CIObj.src = "images/EventlogDisplaySm.gif"; } if ( arguments.length == 1 ) { processApplyButton(); } } // compensate for IE 5.x bug function hideAlertSel() { Tid = null; AL_AlertSel.style.display = "none"; } // Add Computer to Store if Not Already var CompRecLength = 3; function processCompAddToStore(CNme,CDesc,Cid) { for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) { if ( Cid == AC_CompStoreArr[i] ) { // if in Store, skip it return; } } // Not in Store, Add now AC_CompStoreArr[i++] = Cid; AC_CompStoreArr[i++] = CNme; AC_CompStoreArr[i] = CDesc; } var curCompDesc = ""; function getCompNameDesc(CompID) { for ( var i=0; i<AC_CompStoreArr.length; i+=CompRecLength ) { if ( CompID == AC_CompStoreArr[i] ) { // if in Store // save Computer Name and Description curServAlertCompDesc = AC_CompStoreArr[i+2]; curServAlertCompNme = AC_CompStoreArr[i+1]; return true; } } return false; } // Process to Toggle the Hide and Show of the Banner & Menu Frames var hideToggle = 0; var TitleDivSize = 100; function processBannerMenu() { if ( hideToggle == 0 ) { top.BannerMenuHide(); hideToggle = 1; ViewAlertsTitleDiv.style.display = "none"; TitleDivSize = 56; } else { top.BannerMenuShow(); hideToggle = 0; ViewAlertsTitleDiv.style.display = ""; TitleDivSize = 100; } } // Process SelectALL or UnselectALL function processSelect(Pflg) { var CObj = null; for ( var j=0, i=0; j<CountOfComps; j++ ) { CObj = document.all["cmpa_"+j]; // computer entry in tree if (CObj.checked == Pflg) { procCompImgClick(CObj,true); // go process ++i; // bump number changed } } if ( i > 0 ) { processApplyButton(); } if ( AL_AlertSel.style.display == "" && AL_AlertSel.style.visibility != "hidden") { AL_AlertSel.focus(); // restore focus } } // Null funcs function processResetButton() { top.banner.processStopCommX(); } function checkEnableSchedButton() { } function PopUpContextOpen() { AL_AlertSel.style.visibility = "hidden"; } function PopUpContextClose() { AL_AlertSel.style.visibility = "visible"; } //--> </script> <script LANGUAGE="JAVASCRIPT" SRC="js/Calendar.js" PURPOSE="COMPONENT" CLASSNAME="com.netobjects.Calendar"></script> <script LANGUAGE="JavaScript" src="js/MiscFunc.js"></script> <script LANGUAGE="JavaScript" src="js/ButtonFunc.js"></script> <script LANGUAGE="JavaScript" src="js/CalendarTimeFunc.js"></script> <script LANGUAGE="JavaScript" src="js/AlertFunc.js"></script> <script LANGUAGE="JavaScript" src="js/WinServicesFunc.js"></script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Connected()"> <!-- processConnectConfirmed(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="DBChanged(cdata)"> <!-- var warr = new Array(); warr = cdata.split("~"); // parse the event data // Ignore if Server Table change if ( warr[0] == "4" ) return; // ignore top.Rstatus.StatDB.style.display = ""; if ( CTid == null ) { CTid = setTimeout("processDBChanged()",30000); // Delay 30 secs then process } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="Disconnected()"> <!-- top.Rstatus.Pstat("Disconnected",true); if ( Tid != null ) { clearTimeout(Tid); // stop timeout routine } Tid = setTimeout("processReconnect()",10000); // Delay 10 secs then try reconnnect //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupLookupRecordPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs)"> <!-- AlertLupRecPart1(AlID, AlName, AlDesc, AlThresh, AlOver, AlEveryTime, AlDur, AlSched, AlSDT, AlEDT, AlArrayIDs); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupLookupRecordPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend)"> <!-- AlertLupRecPart2(AlID, AlRunProg, AlProgNme, AlProgramArgs, AlENotify, AlEAddr, AlESubj, AlPhNotify, AlPhNumber, AlTextToSpeak, AlPgNotify, AlPgNumber, AlTextToSend); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpComplete()"> <!-- processAlertOpComplete(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertGroupOpError()"> <!-- processAlertOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventLookupRecord1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme)"> <!-- AlertEventLupRec1(EvID, EvTimStmp, EvValue, EvThresh, EvOver, EvDur, EvEmNotify, EvPhNotify, EvProNotify, EvPgNotify, EvObjNme, EvCntNme, EvCmpNme); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="AlertEventLookupRecord2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver)"> <!-- AlertEventLupRec2(EvID, EvAlertID, EvValueID, EvAlGrpID, EvObjID, EvCntrID, EvCmpID, EvGrpID, EvServerID, EvObjDesc, EvCntrDesc, EvCmpDesc, EvOSver); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerLookupRecord(Cid,Gid,SrvID,Nme,Desc,Pswd,OSVer,Addr,Port)"> <!-- processCompAddToStore(Nme,Desc,Cid); if ( ALupMode == "AlertEvent" ) { processAlertServicesComputerLookup(Cid,Nme,Desc); } else if ( ALupMode == "EventPopIn" ) { processPopulateInputComputer(Cid,Nme,Desc); } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpComplete()"> <!-- if ( ALupMode == "EventPopIn" ) { processPopulateInputOpComplete(); } VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ComputerOpError()"> <!-- processComputerOpError(); VA_CommBusy = 0; // reset Comm busy flag //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StartCommunication()"> <!-- top.banner.processStartComm(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="StopCommunication()"> <!-- top.banner.processStopComm(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpComplete()"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorOpComplete(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorOpError()"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorOpError(); //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="EventLogDataRecord(ELData)"> <!-- VA_CommBusy = 0; // reset Comm busy flag WarningBox.style.display = "none"; WarningBox1.style.display = "none"; if ( ELData == "GetLast" ) { WarningBox1.style.display = ""; } else { processAlertEventLogRecord(ELData); } //--> </script> <script LANGUAGE="JavaScript" FOR="RpmCC_VA" EVENT="ELMonitorLookupRecord(ELCrec)"> <!-- VA_CommBusy = 0; // reset Comm busy flag processELMonitorLookupRecord(ELCrec); //--> </script> <script LANGUAGE="JavaScript" src="js/PopUpMenuFunc.js"></script> <object ID="RpmCC_VA" NAME="RpmCC_VA" WIDTH="14" HEIGHT="1" style="display:none" CLASSID="CLSID:D88C2358-FC83-11D1-BF49-00104B2D6F80" CODEBASE="controls/RPMComm.cab#version=5,2,0,0"> <param name="_Version" value="65536"> <param name="_ExtentX" value="2646"> <param name="_ExtentY" value="1341"> <param name="_StockProps" value="0"> </object> <!-- Invisible Object to Support Simulated Click Event --> <button id="FakeBut" style="display:none" onclick="top.banner.savePageCoord(event,document.body,'ViewEventlogDisplay')"> </button> <!-- Define Images used in dynamic HTML generation to force loading and caching now --> <div style="display:none"> <img src="images/sEventViewer.gif"><img src="images/Counter.gif"><img src="images/Unchecked.gif"> <img src="images/monitoritalert.gif"><img src="images/Computer.gif"><img src="images/L.gif"> <img src="images/Checked.gif"><img src="images/T.gif"><img src="images/Objects.gif"> <img src="images/EventlogDisplaySm.gif"> </div> <!-- PopUp to Prompt to Configure the Alert Filter --> <div id="PopUpDiv" class="PopUpBox" style="display:none; left:150; top:150; "> <span id="ELogConfigLine" > <center height="28" style="width:500; font-weight:800; font-size:10pt; background-color:graytext; color:captiontext" >Configure EventLogWatch Display Filter</center> <center><div class="EventConfig" id="ELogConfig" style="width:500px;" align="center"> <table border="0" width="500" > <tr> <td width="90" align="right" class="inputlabel" height="32">Watch/Alert:</td> <td width="390" align="left" height="1"> <select ONCHANGE="processAlertName()" SIZE="1" NAME="AL_AlertSel" id="AL_AlertSel" class="idis" style="width: 185pt" style="display: none"></select> </td> <select SIZE="1" NAME="AC_TrapMonitorStore" style="display: none"></select> </tr> <tr style="display:none"> <td width="90" align="right" class="inputlabel" height="32">Start Date:</td> <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StartDate" calendar="VA_calwin" CalObj="" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand"> </td> </tr> <tr style="display:none"> <td width="90" align="right" height="1"></td> <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_calwin" ID="VA_calwin" CalState="0" style="display: none"></div></td> </tr> <tr style="display:none"> <td width="90" align="right" class="inputlabel" height="1">Stop Date:</td> <td width="390" align="left" height="1"><input TYPE="text" SIZE="17" style="font-weight: 500" NAME="VA_StopDate" onClick="this.blur(); processCalendarClick(this)" style="cursor:hand" CalObj="" calendar="VA_scalwin"></td> </tr> <tr style="display:none"> <td width="90" align="right" height="1"></td> <td width="390" align="left" height="1"><div class="CalendarTextBox" Name="VA_scalwin" ID="VA_scalwin" CalState="0" style="display: none"></div></td> </tr> <tr> <td width="90" align="right" class="inputlabel" height="1">Selection(s):</td> <td width="390" align="left" height="1"> <div id="VA_Select" class="VASelectBox"></div> </td> </tr> </table></div> <table border="1" cellspacing="1" cellpadding="1" height="40" width="500"> <tr><td align="left" width="20%" class="inputlabel"> Show On Open<br> Last <select onchange="processMostRecentHours()" id="lasthours"></select> Hrs</td><td width="80%" align="center"><button onclick="processSelect('0')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:80px; height:28px" id="bSelC" ><img src="images/selectall.gif" align="absmiddle" height="15" width="14">Select All</button> <button onclick="processSelect('1')" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" style="width:93px; height:28px" id="bUselC" ><img src="images/unselectall.gif" align="absmiddle" height="15" width="14">Unselect All</button> <button id="DoneButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Cancel and Hide the Configure Filter" style="width:70px; height:28px" onClick="processDoneButton()"><img src="images/CloseImg.gif" align="absmiddle" height="14" width="15"> Close</button></td></tr> </table></center></span> </div> <!-- End of PopUp to Prompt to Configure the Alert Filter --> <center> <div id="VA_MainBox" class="VAMainBox" style="display:none"> <div id="ViewAlertsTitleDiv"><table border="1" borderColor="activeborder" align="left"> <table border="1" borderColor="activeborder" align="left"> <tr><td borderColorDark="graytext" borderColorLight="white" style="font-weight:800; font-size:12pt; background-color:threedhighlight; color:windowtext"> <img src="images/EventlogDisplaySm.gif" align="absmiddle" height="16" width="16"> EventLogWatch Display </td></tr> </table> <BR CLEAR=ALL><HR align="left"></div> <!-- Alert Event Log Window --> <center class="inputlabel">EventLogWatch Display</center> <div class="EventLog" ID="ELogWin" style="width:99%" align="center"> <center><div style="display:none; width:100%" id="WarningBox" align="center"><table border="0" cellpadding="0" cellspacing="2"> <tr> <td width="43"><img src="images/HourGlass.gif" width="32" height="32" alt="Please Wait!" align="bottom" border="0"></td> <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:infotext">Please Wait For Most Recent EventLog Messages!</td> </tr> </table> </div> <div style="display:none; width:100%" id="WarningBox1" align="center"><table border="0" cellpadding="0" cellspacing="2"> <tr> <td width="*" style="font-family:Arial; font-size:10pt; font-weight:bold; color:red">There Are No Most Recent EventLog Messages Available!</td> </tr> </table> </div></center> <span id="ELogText"></span><select SIZE="1" NAME="ELogParams" logeventid="" logtime="0" ELBgFlg=0 style="display: none"></select></div> <div style="height:0px; width:99%" align="center"> <select SIZE="1" NAME="VA_EventStore" style="display: none"></select> <select SIZE="1" NAME="VA_ServEventStore" style="display: none"></select> <table border="1" cellspacing="1" cellpadding="1" height="40" width="100%"> <tr> <td width="15%" align="left" class="inputlabel"><span title="Uses the 'Asterisk' WAV assignment in Control Panel->Sounds & Multimedia Properties"><INPUT TYPE="checkbox" NAME="AlertAudioEnabled" id="AlertAudioEnabled" class="inputlabel" CHECKED>Audio Alert</span></td> <td align="center" width ="70%"><button id="ViewCurrentButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="View Filter for Alerts and associated Events displayed in the Event Log" style="width:90px; height:29px" onClick="processViewCurrentButton()" disabled><img src="images/OpenImg.gif" align="absmiddle" height="14" width="15"> View Filter</button> <button id="ConfigButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Configure Filter for Alerts and associated Events displayed in the Event Log" style="width:120px; height:29px" onClick="processConfigureButton()" disabled><img src="images/ConfigImg.gif" align="absmiddle" height="18" width="17">Configure Filter</button> <button id="ClearButton" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Clear the Event Log" style="width:90px; height:29px" onClick="processClearButton()" disabled><img src="images/unselectall.gif" align="absmiddle" height="15" width="14"> Clear Log</button> <button id="StatusPrintButton" title="Print AlertWatch Status Log" onclick="if (this.bdis == '0') processPrintStatus();" bdis="0" style="width:90px; height:29px" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" DISABLED><img src="images/Printer.gif" align="absmiddle" height="15" width="17"> Print</button></td> <td width="15%" align="right"><button onclick="processBannerMenu()" title="Press to Toggle Hide/Show of Menu and Banner Frames" style="cursor:hand"><img src="images/FullView.gif" align="absmiddle" height="16" width="16"></button></td></tr></table></div> <!-- Alert Filter Window--> <span id="ELogViewCurLine" style="display:none"><HR align="left"> <center class="inputlabel" >EventLogWatch Display Filter</center> <div class="EventFilter" ID="ELogViewCur" style="height:110px; width:530px; " align="center"> <select SIZE="1" NAME="VA_FilterStore" style="display: none"></select> </div> <table border="1" cellspacing="1" cellpadding="1" height="40" width="40%"> <tr><td align="center"><button id="VC_DeleteButton" disabled="disabled" style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Delete the Selected Filter Entry and stop display of associated Events in the Event Log" style="width:100px; height:28px" onClick="processDeleteEntryButton()"><img src="images/DelImg.gif" align="absmiddle" height="14" width="14">Delete Entry</button>  <button style="font-family:arial; font-size : 8pt; font-weight : 600; cursor:hand" title="Hide the Filter Display" style="width:100px; height:28px" onClick="processHideCurrentButton()"><img src="images/collapse.gif" align="absmiddle" height="14" width="16">Collapse</button></td></tr> </table></span> <!--<div style="height:3px; width:92%" align="center"></div>--> </center></div> </center> </body> </html>